//
//  HomeTableViewCell.m
//  TriumphInTheSkiesAPP
//
//  Created by 要帅气的生活 on 15/11/3.
//  Copyright © 2015年 UNOHACHA. All rights reserved.
//

#import "HomeTableViewCell.h"

@implementation HomeTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.pic = [[UIImageView alloc] init];
        [self.contentView addSubview:self.pic];
        
        self.title = [[UILabel alloc] init];
        [self.contentView addSubview:self.title];
        
        self.shuoming = [[UILabel alloc] init];
        [self.contentView addSubview:self.shuoming];
    }
    return self;
}

-(void)layoutSubviews
{
    [super layoutSubviews];
    
    self.pic.frame = CGRectMake(3, 5, self.frame.size.width / 3, self.frame.size.height - 10);
    //self.pic.backgroundColor = [UIColor greenColor];
    
    self.title.frame = CGRectMake(23 + self.frame.size.width / 3, self.frame.size.height / 9, self.frame.size.width / 3 * 2 - 23 , self.frame.size.height / 2 - 2);
    self.title.font = [UIFont systemFontOfSize:18];
    self.title.numberOfLines = 0;
    //self.title.backgroundColor = [UIColor yellowColor];
    
    self.shuoming.frame = CGRectMake(23 + self.frame.size.width / 3, self.frame.size.height / 9 * 6 - 1, self.frame.size.width / 9 * 4, self.frame.size.height / 3 - 2);
    self.shuoming.font = [UIFont systemFontOfSize:15];
    //self.shuoming.backgroundColor = [UIColor redColor];
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
